<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">
<%@ page pageEncoding="UTF-8" %>
<%@ page import="jp.co.technotree.apl.api.common.Message,jp.co.technotree.common.ApplicationManager" %>
<%@page import="jp.co.technotree.apl.cmd.rental.Ren2000Bean"%>
<jsp:useBean id="formBean" class="jp.co.technotree.apl.cmd.rental.Ren2000Bean" scope="request" />
<%@page import="jp.co.technotree.apl.api.common.FwCom"%>
<%
ApplicationManager appMng = ApplicationManager.getInstance();	//アプリケーションマネージャの取得（パス等）

%>
<html>
<head>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!-- 数字を電話番号にさせない -->
<meta name="format-detection" content="telephone=no"/>
<link rel='stylesheet' type='text/css' href='../../common/css/rental/ren2000.css' >

<script type='text/javascript' src='../../common/js/NumKeyBoard.js'></script>

<!-- ITEM-DROPDOWN START -->
<link rel="stylesheet" href="../../common/js/dropdown/dropdown.css" type="text/css">
<script src="../../common/js/dropdown/dropdown.js" type="text/javascript"></script>
<!-- ITEM-DROPDOWN END -->

<!--ポップアップ用-->
<link rel='stylesheet' type='text/css' href='../../common/css/popUp.css' >
<script type='text/javascript' src='../../common/js/popUp.js'></script>

<style type="text/css">

	.mainTbl_Left{
		 border: 0px solid #CCCCFF;
		 height:150px;
		 width: 210px;
		 margin-top:-250px;
		 align:center;
	}

	.mainTbl_Right{
		 border: 0px solid #CCCCFF;
		 height:580px;
	}


	.confirmBtn {
		width: 80px;
		height:50px;
		font-size:18px;
		margin-top:1px;
		background-image: -webkit-gradient(linear, left top, left bottom, from(#6699CC), to(#6699CC),color-stop(0.7,#6688CC));
		color: #fff;
		font-weight:bold;
		text-shadow: -1px 2px rgba(0,0,0,0.2);
		-webkit-border-radius:10px;
	
		position:relative; z-index:1;
	}

	.itemSearch {
		width: 130px;
		height:30px;
		font-size:18px;
		margin-top:1px;
		background-image: -webkit-gradient(linear, left top, left bottom, from(#6699CC), to(#6699CC),color-stop(0.7,#6688CC));
		color: #fff;
		font-weight:bold;
		text-shadow: -1px 2px rgba(0,0,0,0.2);
		-webkit-border-radius:10px;
	
		position:relative;
	}

	.confirmBtn2 {
		width: 120px;
		height:50px;
		font-size:18px;
		margin-top:1px;
		background-image: -webkit-gradient(linear, left top, left bottom, from(#6699CC), to(#6699CC),color-stop(0.7,#6688CC));
		color: #fff;
		font-weight:bold;
		text-shadow: -1px 2px rgba(0,0,0,0.2);
		-webkit-border-radius:10px;
	
		position:relative; z-index:1;
	}


	.confirmBtn3 {
		width: 170px;
		height:50px;
		font-size:18px;
		margin-top:1px;
		background-image: -webkit-gradient(linear, left top, left bottom, from(#6699CC), to(#6699CC),color-stop(0.7,#6688CC));
		color: #fff;
		font-weight:bold;
		text-shadow: -1px 2px rgba(0,0,0,0.2);
		-webkit-border-radius:10px;
	
		position:relative; z-index:1;
	}

	.selTitle{
	 font-size:16px;
	 valign:middle;

	}

	.ImageZone{
	 position:absolute;
	 top :100px;
	 right:160px;
	 visibility: visible;

	 width: 200px;
	 height:200px;
	}



	.OrderReason{
	 position:absolute;
	 top :100px;
	 left:660px;
	 visibility: visible;

	 width: 300px;
	 height:200px;
	}
	
	.ReadStyle{
		 background-color:#CCC;
	}
	
	
	img {
     max-height:170px;
     max-width:330px;
     height :auto;
     width :auto;
    } 

</style>



<script language='javascript'>

//画面固定
//document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

function onInit(){

	//出庫完了後、メッセーを出してメイン画面に遷移
	var stateFlg = "<%=formBean.getStateFlg()%>";
	
	var afterFunc="nextPageJump('top1000');"
	if(stateFlg == "1"){
		//出庫処理を正常に完了しました
		alert_Info2("<%=Message.getMessage("INF00020").replace("$1", "出庫処理")%>",afterFunc);
	}
	
	//-------------------------------------------------------------------------
	//<!-- ITEM-DROPDOWN START -->
	var panel = document.getElementById("dropdown-panel");
	var input = document.getElementById("addTable");
	var targetList = getElementsByClassName(input,"input","item",true);
	
	dropdown = new CItemDropDownList(targetList,panel,"drop-contents");
	dropdown.setKeyUpEvent(text_onKeyUp);
	dropdown.setSelectEvent(list_onSelect);
	
	//
	dropdown.serverURL="../itm1099/itm1099";
	//<!-- ITEM-DROPDOWN END -->
	//-------------------------------------------------------------------------
	
	//-------------------------------------------------------------------------
	//<!-- NumKeyBoard START -->
	ProcStart	= new Date();

	clsNKB.init("NumKeyBoardID");
//	clsNKB.parentElement	= document.getElementById("BodyBlock");

	clsNKB.textFontSize		= 20;
	clsNKB.buttonFontSize	= 30;
	clsNKB.boxX				= -70;
	clsNKB.boxY				= 0;
	clsNKB.boxBalloonOffset	= 210;
	//<!-- NumKeyBoard END -->
	//-------------------------------------------------------------------------
}


function nextPageJump(nextPage){
	mainForm = document.getElementById("F1");
	document.getElementById("nextPage").value = nextPage;
	mainForm.submit();
}


//=======================================================select変更連動
//===========================================
//組がが変更された時の処理
//===========================================
//子ノード作成
function selectIn(obj,arrVar,arrTxt){
	var strObject = document.getElementById(obj);
	for(var k=0; k < arrVar.length; k++){
		//optionのvalue属性にセット(key)
		var ele = document.createElement("option");
		ele.value = arrVar[k];
		//optionにセット(value)
		var str = document.createTextNode(arrTxt[k]);
		ele.appendChild(str);

		strObject.appendChild(ele);
	}
}


//子ノード削除
function selectDel(Obj){
	var strObject = document.getElementById(Obj);
	for(var i= strObject.childNodes.length-1; i >= 0;i--) {
		strObject.removeChild(strObject.childNodes[i]);
	}
}


function reformWork(){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();

	var strWorkCd1Txt2= new Array();
	var strWorkNm1Val2= new Array();

	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";

	strWorkCd1Txt2[0] = "";
	strWorkNm1Val2[0] = "";

	 //=======================================
	 //組リスト取得
	 //=======================================
	 <%
	 Ren2000Bean.PullData[] work1NmPullList =formBean.getInputEmpPullList();

	 for (int j=0; j < work1NmPullList.length; j++){
		 Ren2000Bean.PullData  data = work1NmPullList[j];
	%>
		strWorkCd1Txt[<%=j+1%>] = "<%=data.value%>"
	 	strWorkNm1Val[<%=j+1%>] = "<%=data.key%>"
	<%}%>
	   //作業内容の子ノードを削除
	   selectDel("delvUsr");
	   //子ノードを作成
	   selectIn("delvUsr",strWorkNm1Val,strWorkCd1Txt);


	 //=======================================
	 //出庫担当リスト取得
	 //=======================================
	 <%
	 Ren2000Bean.PullData[] work2NmPullList =formBean.getInputEmpPullList2();

	 for (int j=0; j < work2NmPullList.length; j++){
		 Ren2000Bean.PullData  data = work2NmPullList[j];
	%>
		strWorkCd1Txt2[<%=j+1%>] = "<%=data.value%>"
	 	strWorkNm1Val2[<%=j+1%>] = "<%=data.key +"*"+ data.key2%>"
	<%}%>
	   //作業内容の子ノードを削除
	   selectDel("delvUsrList");
	   //子ノードを作成
	   selectIn("delvUsrList",strWorkNm1Val2, strWorkCd1Txt2);


}



//組の区分選択により
function odrUsrSideDell(odrUsr){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();
	var arrCnt=1;
	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";

	//出庫担当者の子ノードを削除
	selectDel("delvUsrList");

	 <%
		 Ren2000Bean.PullData[] work1ForWork2List =formBean.getInputEmpPullList2();
		 for (int j=0; j < work1ForWork2List.length; j++){
			 Ren2000Bean.PullData  data = work1ForWork2List[j];
	 %>
		 	if(odrUsr.value == "<%=data.key%>"){
		 		strWorkCd1Txt[arrCnt] = "<%=data.value%>"
			 	strWorkNm1Val[arrCnt] = "<%=data.key  +"*"+ data.key2%>"
			 	arrCnt++;
			//組の区分が何も選択ない場合
		 	}else if(odrUsr.value == ""){
		  		reformWork();
		 		return;
		 	}
	 <%}%>


//子ノードを作成
selectIn("delvUsrList",strWorkNm1Val,strWorkCd1Txt);



}


//担当者の区分選択により
function odrUsrSideDell2(usrList){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();
	var arrCnt=1;
	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";


	//key1とkey2を分ける
	var usrListArr = usrList.value.split("*");


	//出庫担当者の子ノードを削除
	selectDel("delvUsr");

	 <%
		 Ren2000Bean.PullData[] work1ForWorkList =formBean.getInputEmpPullList();
		 for (int j=0; j < work1ForWorkList.length; j++){
			 Ren2000Bean.PullData  data = work1ForWorkList[j];
	 %>
		 	if(usrListArr[0] == "<%=data.key%>"){
		 		strWorkCd1Txt[arrCnt] = "<%=data.value%>"
			 	strWorkNm1Val[arrCnt] = "<%=data.key%>"

			 	arrCnt++;
			//組の区分が何も選択ない場合
		 	}else if(usrList.value == ""){
		  		reformWork();
		 		return;
		 	}
	 <%}%>


//子ノードを作成
selectIn("delvUsr",strWorkNm1Val,strWorkCd1Txt);

//出庫担当者による組の自動選択
document.getElementById("delvUsr").selectedIndex = 1;

}

//=======================================================select変更連動

//-------------------------------------------------------------------------
//<!-- ポップアップ START -->

//パップアップ解除
function back(){
	document.getElementById("opAlertBtn").style.display = "none";
	document.getElementById("opAlert").style.display = "none";
	document.getElementById("opAlertButton").style.display = "none";
	document.getElementById("opAlertTop").style.display = "none";
	document.getElementById("allbackgr").style.display = "none";
}

//<!-- ポップアップ END -->
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
//<!-- ITEM-DROPDOWN START -->
var dropdown = null;

var inputDateTime = null;
var timerId = null;
var eventSrc={};
function text_onKeyUp(object,sender,evt){
	var value = sender.value;
	eventSrc.object = object;
	eventSrc.sender = sender;
	eventSrc.evt = evt;
	inputDateTime = new Date();
	//-----------------------------------------------
	//品番自動ハイフン「-」を付ける
	var chkLen=5;
	if(event.keyCode != 0008){
		//指定の桁以上ならスタート
		if(value.length>=chkLen){
			var hikaku = value.substring(chkLen, chkLen+1);
			if(hikaku != "-"){
				var frontValue = value.substring(0, chkLen);
				var backValue  = value.substring(chkLen, value.length);
				sender.value=frontValue+"-"+backValue;
			}
		}
	}
	//小文字を大文字へ
	sender.value = sender.value.toUpperCase();
	value = sender.value;
	//-----------------------------------------------
	if ( value.length >= <%=formBean.getGohoKensu() %> ){
		if ( evt.keyCode == 37 || evt.keyCode == 39 ){
			
		}else{
			if ( timerId == null ){
				// 連続送信防止
				timerId = window.setTimeout(function(){text_onTimeOut(object,sender,evt);},500);
			}
		}
	}
}

/**
* 一定時間入力が止まった場合に動作
*/
function text_onTimeOut(object,sender,evt){
	var nowDateTime = new Date();
	var lngTime = (nowDateTime.getTime()-inputDateTime.getTime());
	if ( lngTime >= 1000 ){
		timerId = null;
		xmlRequest(object,sender,evt);
	}else{
		timerId = window.setTimeout(function(){text_onTimeOut(eventSrc.object,eventSrc.sender,eventSrc.evt);},500);
	}
}

/**
* XML要求処理
*/
function xmlRequest(object,sender,evt){
	//alert(evt.keyCode);
	var table = document.getElementById("drop-contents");
	table.innerHTML="";
	
	var top = calculateOffsetTop(sender);
	var left = calculateOffsetLeft(sender);
	var height = sender.offsetHeight;
	var panel = document.getElementById("dropdown-panel");
	panel.style.top=top+height+"px";
	panel.style.left=left+"px";
	panel.style.display="block";
	
	var param="itemCd="+sender.value+"&rsvDiv=0"+"&tempFlg=0"+"&delDiv=0&rackNmFlg=1";
	
	try {
		var frm = document.main;
		var objs = frm["invCate"];
		if (objs[1].checked == true){
			//仮入出庫
			param += "&afterProc=1";
		}
	} catch (e) {
		
	}

	object.doXmlRequest(object,sender,param);
}


/**
* リスト選択時コールバック処理
*/
function list_onSelect(object,sender,json){
	var panel = document.getElementById("dropdown-panel");
	panel.style.display="none";
	sender.focus();
	
	//----------
	var name=sender.name;
	var idx=name.substring(name.indexOf("[")+1,name.length-1);
	
	document.getElementById("itemNo").value=json.itemcd;
	/* 
	document.getElementById("itemNm").value=json.itemnm;
	document.getElementById("model").value=json.model;
	document.getElementById("rackNo").value=json.racknm;
	
	if(json.picfilenm){
		document.getElementById("picfileNm").src += json.picfilenm;
	}
	if(json.updatedt){
		document.getElementById("updateDt_hid").value = json.updatedt;
	}
	if(json.stockupdate){
		document.getElementById("updateDt_stock").value = json.stockupdate; //在庫更新日（発注）
	}
	 */
}


function getElementsByClassName(parent,tagName,className,fullMatch){
	var i=0,j=0;
	var result = [], cnt = 0;
	var list = parent.getElementsByTagName(tagName);
	for ( i=0; i<list.length; i++ ){
		var name = list[i].className;
		if ( name ){
			var nameList = name.split(' ');
			for ( j=0; j<nameList.length; j++ ){
				if ( fullMatch ){
					if ( nameList[j] == className ){
						result[cnt++] = list[i];
					}
				}else{
					if ( nameList[j].indexOf(className) != -1 ){
						result[cnt++] = list[i];
					}
				}
			}
		}
	}
	return result;
}
function closeBtn(){
	var panel = document.getElementById("dropdown-panel");
	panel.style.display="none";
} 
//----------------------------------------------------------------------

//-------------------------------------------------------------------------
//<!-- NumKeyBoard START -->
var		clsNKB			= new CNumKeyBoard();


//=================================================================
//	データ入力後の処理（看板枚数による発注数量の処理）
//=================================================================
function afterInputData(obj) {
	var frm = document.forms.main;
	var parent_node = obj.parentNode;
	for(var i = 0; i < 2; i++) {
		if(parent_node.className == "ItemLine") {
			break;
		}
		parent_node = parent_node.parentNode;
	}
	var child_nodes = parent_node.getElementsByTagName("INPUT");
	for(var i = 0; i < child_nodes.length; i++) {
		if(child_nodes[i].className == "DetailStart") {
			// 開始時間の設定
			if(child_nodes[i].value == "") {
				child_nodes[i].value = FieldStart;
			}
		}
		if(child_nodes[i].className == "DetailEnd") {
			// 終了時間の設定
			child_nodes[i].value = frm.NowTime.value;
		}
		if(child_nodes[i].className == "DetailTime") {
			// 作業時間の設定
			child_nodes[i].value = convStrToNum(child_nodes[i].value) + Math.round(PassTime(new Date(FieldStart)) / 1000);
		}
		if(child_nodes[i].className == "InputChanged") {
			// 行変更フラグを設定
			child_nodes[i].value = "1";
		}
		if (child_nodes[i].className.match(/DetailDate/i)) {
			// 日付の設定
			child_nodes[i].value = delComma(child_nodes[i].value);
		}
	}
}
//--------------------------------
//カンマ削除関数
//--------------------------------
function delComma(w) {
var z = w.replace(/,/g,"");
return (z);
}

//--------------------------------
//	型変換 String→Numeric
//--------------------------------
function convStrToNum(strVal) {
	var cnv = Number(strVal);
	var res = 0;
	if(isNaN(cnv)) {
		// 数値じゃない!
	} else {
		res = cnv;
	}
	return res;
}
//<!-- NumKeyBoard END -->
//----------------------------------------------------------------------

//戻るボタン押下
function backBtn(nextPage){
	var changeFlg = changeCheck()
	if(changeFlg=="1"){
		//発注処理を中止します。よろしいですか？
		var afterFunc="nextPageJump('"+nextPage+"');"
		if (!confirm_Custom3("<%=Message.getMessage("INF01040").replace("$1", "出庫処理")%>",afterFunc)){
			return ;
		}
	}else{
		nextPageJump(nextPage);
	}
}

//編集を行ったかチェック
//return:0=変更なし 1=変更あり
function changeCheck() {
	var frm=document.main;
	var changeFlg = "0";
	
	obj=frm["itemNo"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	obj=frm["delvDt"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	obj=frm["delvNewNum"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	obj=frm["delvUsedNum"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	obj=frm["delvReasonTxt"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	obj=frm["delvSiteUsr"]; if (obj.defaultValue != obj.value) {changeFlg="1";}
	//セレクトボックスのチェック
	obj=frm["delvDiv"]; if (obj.options[obj.selectedIndex].defaultSelected == false) {changeFlg="1";}
	obj=frm["delvSite"]; if (obj.options[obj.selectedIndex].defaultSelected == false) {changeFlg="1";}
	//obj=frm["delvSiteUsr"]; if (obj.options[obj.selectedIndex].defaultSelected == false) {changeFlg="1";}
	obj=frm["delvUsr"]; if (obj.options[obj.selectedIndex].defaultSelected == false) {changeFlg="1";}
	obj=frm["delvUsrList"]; if (obj.options[obj.selectedIndex].defaultSelected == false) {changeFlg="1";}
	
	return changeFlg;
}


//「出庫登録」ボタン押下
function orderBtn(){
	
	validCheck();//入力チェックによる背景色を付ける
	
	updateDtCheck();
	//orderBtnExe();

}


//入力チェックによる背景色を付ける
function validCheck(){
	
	var itemNo = document.getElementById("itemNo");
	var delvDiv = document.getElementById("delvDiv"); 			//出庫区分
	var delvDt = document.getElementById("delvDt"); 				//出庫日
	var delvNewNum = document.getElementById("delvNewNum");		//出庫新品数量
	var delvUsedNum = document.getElementById("delvUsedNum");		//出庫中古数量
	var delvSite = document.getElementById("delvSite");			//出庫先
	var delvSiteUsr  =  document.getElementById("delvSiteUsr");	//出庫先担当
	var delvReasonTxt  =  document.getElementById("delvReasonTxt");		//出庫理由
	
	
	var delvUsrListKey = document.getElementById("delvUsrListKey");		//出庫担当者 キー
	var delvUsrListObj = document.getElementById("delvUsrList");		//出庫担当者
	var delvUsrListArr = delvUsrListObj.options[delvUsrListObj.selectedIndex].value.split("*");
	var delvUsr = document.getElementById("delvUsr");				//出庫担当者(組)
	
	if(delvUsrListArr[1]){
		delvUsrListKey.value = delvUsrListArr[1];
	}else{
		delvUsrListKey.value ="";
	}

	//============
	//背景色解除
	//============
	itemNo.style.backgroundColor = 'white';
	delvDiv.style.backgroundColor = 'white';
	delvDt.style.backgroundColor = 'white';
	delvNewNum.style.backgroundColor = 'white';
	delvUsedNum.style.backgroundColor = 'white';
	delvSite.style.backgroundColor = 'white';
	delvSiteUsr.style.backgroundColor = 'white';
	delvReasonTxt.style.backgroundColor = 'white';
	delvUsrListObj.style.backgroundColor = 'white';
	delvUsr.style.backgroundColor = 'white';
	
	//============
	//背景色設定
	//============
	//入力チェック（必須）-----------------------------------------------------------------start
	if(itemNo.value ==""){
		itemNo.style.backgroundColor = 'pink';
	}
	if(delvDiv.value ==""){
		delvDiv.style.backgroundColor = 'pink';
	}
	if(delvDt.value ==""){
		delvDt.style.backgroundColor = 'pink';
	}
	if(delvNewNum.value ==""){
		delvNewNum.style.backgroundColor = 'pink';
	}
	if(delvUsedNum.value ==""){
		delvUsedNum.style.backgroundColor = 'pink';
	}
	if(delvSite.value ==""){
		delvSite.style.backgroundColor = 'pink';
	}
	if(delvSiteUsr.value ==""){
		delvSiteUsr.style.backgroundColor = 'pink';
	}
	if(delvReasonTxt.value ==""){
		delvReasonTxt.style.backgroundColor = 'pink';
	}
	if(delvUsrListKey.value ==""){
		delvUsrListObj.style.backgroundColor = 'pink';
		delvUsr.style.backgroundColor = 'pink';
	}
	//入力チェック（必須）-----------------------------------------------------------------end
	//入力チェック-------------------------------------------------------------------------start
	//予備品Mから存在チェック＆在庫チェック
	if(!mRsvSupplyCheck()){
		//itemNo.style.backgroundColor = 'pink';
	}
	if(delvNewNum.value < 0){
		delvNewNum.style.backgroundColor = 'pink';
	}
	if(delvUsedNum.value < 0){
		delvUsedNum.style.backgroundColor = 'pink';
	}
	//入力チェック-------------------------------------------------------------------------end
}
//「出庫」実行
function orderBtnExe(){
	mainForm = document.getElementById("F1");

	var itemNo = document.getElementById("itemNo").value;
	var delvDiv = document.getElementById("delvDiv").value; 			//出庫区分
	var delvDt = document.getElementById("delvDt").value; 				//出庫日
	var delvNewNum = document.getElementById("delvNewNum").value;		//出庫新品数量
	var delvUsedNum = document.getElementById("delvUsedNum").value;		//出庫中古数量
	var delvSite = document.getElementById("delvSite").value;			//出庫先
	var delvSiteUsr  =  document.getElementById("delvSiteUsr").value;	//出庫先担当
	var delvReasonTxt  =  document.getElementById("delvReasonTxt").value;		//出庫理由
	
	
	var delvUsrListKey = document.getElementById("delvUsrListKey");		//出庫担当者 キー
	var delvUsrListObj = document.getElementById("delvUsrList");		//出庫担当者
	var delvUsrListArr = delvUsrListObj.options[delvUsrListObj.selectedIndex].value.split("*");

	if(delvUsrListArr[1]){
		delvUsrListKey.value = delvUsrListArr[1];
	}else{
		delvUsrListKey.value ="";
	}

	//validCheck();//入力チェックによる背景色を付ける
	
	//入力チェック-----------------------------------------------------------------start
	if(delvDiv ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫区分")%>");
		return ;
	}else if(delvDt ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫日")%>");
		return ;
	}else if(delvNewNum ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫新品数量")%>");
		return ;
	}else if(delvNewNum < 0){
		alert_Custom("<%=Message.getMessage("WRN00060").replace("$1", "出庫新品数量")%>");
		return ;
	}else if(delvUsedNum ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫中古数量")%>");
		return ;
	}else if(delvUsedNum < 0){
		alert_Custom("<%=Message.getMessage("WRN00060").replace("$1", "出庫中古数量")%>");
		return ;
	}else if(Number(delvNewNum.replace(/,/g,""))==0 && Number(delvUsedNum.replace(/,/g,""))==0){
		alert_Custom("<%=Message.getMessage("WRN00061").replace("$1", "出庫新品数量と出庫中古数量のどちらか")%>");
		return ;
	}else if(delvSite ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫先")%>");
		return ;
	}else if(delvSiteUsr ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "出庫先担当")%>");
		return ;
	}else if(delvReasonTxt ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "理由")%>");
		return ;
	}else if(delvUsrListKey.value ==""){
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "修理/貸出担当者")%>");
		return ;
	//入力チェック-----------------------------------------------------------------end
	}else{
		var afterFunc="yesOrderBtn();"
		if (!confirm_Custom3("<%=Message.getMessage("INF01080").replace("$1","出庫")%>",afterFunc)){
			return ;
		}
	}

}

//「はい」を押された時
function yesOrderBtn(){
	document.getElementById("orderExe").value = "1";
	mainForm = document.getElementById("F1");
	mainForm.submit();
}

function JSONConvert(node){
	var type = node.nodeType;
	if ( isTextNode(node) ){
		var text = getTextValue(node);
		return text;
	}
	if ( type==1 ){
		var json = {};
		var nodeName = node.nodeName;
		var childs = node.childNodes;

		for (var i = 0; i<childs.length; i++){
			var child = childs[i];
			var obj = json[child.nodeName];

			if ( child.nodeType == 1 ){
				if ( obj ){
					var array = null;
					if ( !isArray(obj) ){
						array=[];
						array[array.length]=obj;
					}else{
						array=json[child.nodeName];
					}
					array[array.length]=JSONConvert(child);
					json[child.nodeName]=array;
				}else{
					json[child.nodeName]=JSONConvert(child);
				}
			}
		}
		return json;
	}
}

function isTextNode(node){
	if ( node.hasChildNodes() ){
		var childs = node.childNodes;
		for (var i = 0; i<childs.length; i++){
			var child = childs[i];
			if ( child.nodeType != 3 ) return false;
		}
	}
	return true;
}

function getTextValue(node){
	if ( node.hasChildNodes() ){
		var childs = node.childNodes;
		var child = childs[0];
		if ( child.nodeType == 3 ){
			return child.nodeValue;
		}
	}
	return null;
}
//------------------------------------------------------------------------------

//*************************************************
//AJAX 部分(予備品Mから存在チェック＆在庫チェック)
//*************************************************
function mRsvSupplyCheck(){
	
	var finditemNo = document.getElementById("itemNo").value;
	
	var xmlHttp;

	xmlHttp = new XMLHttpRequest();
	//xmlHttp.onreadystatechange = checkStatus2;
	xmlHttp.open("GET", "../itm2099/itm2099?itemCd="+finditemNo+"&rsvDiv=0"+"&tempFlg=0"+"&delDiv=0", false);
	xmlHttp.send(null);
	
	//if (xmlHttp.status == 200){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
		var xml = xmlHttp.responseXML;
		var rootNodes = xml.getElementsByTagName("list");
		var rootNode = rootNodes[0];
		var json = JSONConvert(rootNode);
		
		if (json==null) {
		}else {
			var itemNo1 = json.itemcd1;
			var newstock = json.newstock;
			var useStock = json.usestock;
			delvNewNum = document.getElementById("delvNewNum").value;
			delvUsedNum = document.getElementById("delvUsedNum").value;
			
			//存在チェック
			//確定時と発注時の更新日を比較
			if(itemNo1){
				//在庫チェック
				if(Number(newstock.replace(/,/g,""))<Number(delvNewNum.replace(/,/g,""))){
					document.getElementById("delvNewNum").style.backgroundColor = 'pink';
					alert_Custom("<%=Message.getMessage("WRN00050").replace("$1", "出庫新品数量").replace("$2", "新品在庫数")%>");
					return false;
				}
				if(Number(useStock.replace(/,/g,""))<Number(delvUsedNum.replace(/,/g,""))){
					document.getElementById("delvUsedNum").style.backgroundColor = 'pink';
					alert_Custom("<%=Message.getMessage("WRN00050").replace("$1", "出庫中古数量").replace("$2", "中古在庫数")%>");
					return false;
				}
				
				//orderBtnExe(); //出庫実行
				return true;;
			}else{
				//予備品として登録されていない品番です。
				document.getElementById("itemNo").style.backgroundColor = 'pink';
				alert_Custom("<%=Message.getMessage("WRN00120")%>");
				
				return false;
			}

		}
	}
	return false;
}

//*************************************************
//AJAX 部分(確定時と発注時の予備品Mの更新日を比較)
//※※編集時のみ※※
//*************************************************
function updateDtCheck(btnCate){
	
	var findItemNo = document.getElementById("itemNo").value;
	
	var xmlHttp;

	xmlHttp = new XMLHttpRequest();
	xmlHttp.onreadystatechange = checkStatus2;
	xmlHttp.open("GET", "../itm2099/itm2099?itemCd="+findItemNo, false);
	xmlHttp.send(null);

	function checkStatus2(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
			var xml = xmlHttp.responseXML;
			var rootNodes = xml.getElementsByTagName("list");
			var rootNode = rootNodes[0];
			var json = JSONConvert(rootNode);
			if (json==null) {
			}else {
				var orderUpdateDt = json.updatedt;
				var confirmUdateDt = document.getElementById("updateDt_hid").value;
				var stockUpdateDt = json.stockupdate; //在庫更新日（発注）
				var confirmUdateStock = document.getElementById("updateDt_stock").value; //在庫更新日
				var newStock = json.newstock;
				var useStock = json.usestock;
				
				itemNo = document.getElementById("itemNo").value;
				if(itemNo ==""){
					alert_Custom("<%=Message.getMessage("WRN00010").replace("$1", "Y品番")%>");
					return ;
				//予備品Mから存在チェック＆在庫チェック
				}else if(!mRsvSupplyCheck()){
					return ;
				}
				
				//確定時と発注時の更新日を比較
				if((orderUpdateDt == confirmUdateDt) && (stockUpdateDt == confirmUdateStock)){
					
					orderBtnExe(btnCate);
					
				}else{

					alert_Custom("<%=Message.getMessage("WRN01150").replace("$1", "予備品のマスタ情報").replace("$2", "出庫")%>");
					return;
				}

			}
		}
	}
}

//出庫区分
function delvDivChange(){
	var Obj = document.getElementById("delvDiv");
	var delvDiv = Obj.options[Obj.selectedIndex].value;
	
	//出庫先
	var strWorkTxt1= new Array();
	var strWorkVal1= new Array();
	strWorkTxt1[0] = "";
	strWorkVal1[0] = "";
	//出庫担当者
	var strWorkTxt2= new Array();
	var strWorkVal2= new Array();
	strWorkTxt2[0] = "";
	strWorkVal2[0] = "";
	//理由
	var strWorkTxt3= new Array();
	var strWorkVal3= new Array();
	strWorkTxt3[0] = "";
	strWorkVal3[0] = "";
	
	//出庫担当者＆理由のクリア
	document.getElementById("delvSiteUsr").value = '';
	document.getElementById("delvReasonTxt").value = '';
	
	if(delvDiv=="0"){
		//---------------------------------------
		//修理設定
		//---------------------------------------
		
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_s1 =formBean.getInputDelvSiteList_s();
	
		 for (int j=0; j < workPullList_s1.length; j++){
			 Ren2000Bean.PullData  data = workPullList_s1[j];
		%>
			strWorkTxt1[<%=j+1%>] = "<%=data.value%>"
			strWorkVal1[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvSite");
		//子ノードを作成
		selectIn("delvSite",strWorkVal1,strWorkTxt1);
		//---------------------------------------
		
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_s2 =formBean.getInputDelvSiteUsrList_s();
	
		 for (int j=0; j < workPullList_s2.length; j++){
			 Ren2000Bean.PullData  data = workPullList_s2[j];
		%>
			strWorkTxt2[<%=j+1%>] = "<%=data.value%>"
			strWorkVal2[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvSiteUsrSelect");
		//子ノードを作成
		selectIn("delvSiteUsrSelect",strWorkVal2,strWorkTxt2);
		//---------------------------------------
		
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_s3 =formBean.getInputDelvReasonList_s();
	
		 for (int j=0; j < workPullList_s3.length; j++){
			 Ren2000Bean.PullData  data = workPullList_s3[j];
		%>
			strWorkTxt3[<%=j+1%>] = "<%=data.value%>"
			strWorkVal3[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvReason");
		//子ノードを作成
		selectIn("delvReason",strWorkVal3,strWorkTxt3);
		//---------------------------------------
	}else{
		//---------------------------------------
		//貸出設定
		//---------------------------------------
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_k1 =formBean.getInputDelvSiteList_k();
	
		 for (int j=0; j < workPullList_k1.length; j++){
			 Ren2000Bean.PullData  data = workPullList_k1[j];
		%>
			strWorkTxt1[<%=j+1%>] = "<%=data.value%>"
			strWorkVal1[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvSite");
		//子ノードを作成
		selectIn("delvSite",strWorkVal1,strWorkTxt1);
		//---------------------------------------
		
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_k2 =formBean.getInputDelvSiteUsrList_k();
	
		 for (int j=0; j < workPullList_k2.length; j++){
			 Ren2000Bean.PullData  data = workPullList_k2[j];
		%>
			strWorkTxt2[<%=j+1%>] = "<%=data.value%>"
			strWorkVal2[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvSiteUsrSelect");
		//子ノードを作成
		selectIn("delvSiteUsrSelect",strWorkVal2,strWorkTxt2);
		//---------------------------------------
		
		//---------------------------------------
		<%
		 Ren2000Bean.PullData[] workPullList_k3 =formBean.getInputDelvReasonList_k();
	
		 for (int j=0; j < workPullList_k3.length; j++){
			 Ren2000Bean.PullData  data = workPullList_k3[j];
		%>
			strWorkTxt3[<%=j+1%>] = "<%=data.value%>"
			strWorkVal3[<%=j+1%>] = "<%=data.key%>"
		<%}%>
		
		//作業内容の子ノードを削除
		selectDel("delvReason");
		//子ノードを作成
		selectIn("delvReason",strWorkVal3,strWorkTxt3);
		//---------------------------------------
	}

}

//使用用途SELECTによる使用用途TEXTにセット
function setDelvReason(){

	var delvReasonSel = document.getElementById("delvReason");
	var delvReasonTxt = document.getElementById("delvReasonTxt");

	delvReasonTxt.value = delvReasonSel.options[delvReasonSel.selectedIndex].text;
}

//出庫先担当者SELECTによる出庫先担当者にセット
function setDelvSiteUsr(){

	var delvSiteUsrSelect = document.getElementById("delvSiteUsrSelect");
	var delvSiteUsr = document.getElementById("delvSiteUsr");

	delvSiteUsr.value = delvSiteUsrSelect.options[delvSiteUsrSelect.selectedIndex].text;
}
//*************************************************
//AJAX 部分(本品番があれば各マスタの情報を上書きする)
//*************************************************
function itemBlur(){

	var findItemNo = document.getElementById("itemNo").value;
	if(findItemNo.length>=11){
		var xmlHttp;
	
		xmlHttp = new XMLHttpRequest();
		xmlHttp.onreadystatechange = updateSupply;
		xmlHttp.open("GET", "../itm2099/itm2099?itemCd="+findItemNo+"&rackNmFlg=1", false);
		xmlHttp.send(null);
	}
	
	function updateSupply(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
			var xml = xmlHttp.responseXML;
			var rootNodes = xml.getElementsByTagName("list");
			var rootNode = rootNodes[0];
			var json = JSONConvert(rootNode);
			if (json==null) {
			}else {
				document.getElementById("itemNm").value=json.itemnm;
				document.getElementById("model").value=json.model;
				
				if(json.racknm){
					document.getElementById("rackNo").value=json.racknm;
				}
				if(json.picfilenm){
					var basePath = "<%=appMng.getAppConfig("userconfig.imagepath")%>";
					document.getElementById("picfileNm").src = basePath+json.picfilenm;
				}
				if(json.updatedt){
					document.getElementById("updateDt_hid").value = json.updatedt;
				}
				if(json.stockupdate){
					document.getElementById("updateDt_stock").value = json.stockupdate; //在庫更新日（発注）
				}
				return;

			}
		}
	}
}
</script>


</head>

<body onLoad="onInit()">
<form name="main" id="F1" action="./ren2000" method="post" class="frmMain" onsubmit="return false;">
<div id="NumKeyBoardID"></div>
<table style="">
	<!--HEADER TITLE START -->
	<tr style = "background-color:#e1e1e1;  font-weight: bold;  border-bottom:1px solid #e1e1e1; background: -webkit-gradient(linear, left top, left bottom, from(#e1e1e1), to(#ffffff));　 ">
		<td colspan="2" class ="header_tbl" style = "font-size:22px; height:40px;"  align="left">
			　予備品管理システム (<%=formBean.kojou%>)　　　
			<span style="font-size:30px; text-shadow:2px 2px #666; 	color:#aaa;">修理・貸出出庫登録画面</span>
		</td>
	</tr>
	<!--HEADER TITLE END -->

	<!--メインメニュー画面　START  -->
	<tr style="height:628px; ">

		<td class="right" >
			 <!--<div class="mainLine" id = "mainLine" style="display:inline; " ></div>  -->

			<table width ="100%"  class="mainTbl_Right" id="addTable" name="addTable" >
				<!--発注 -->
				<tr>
					<td id="" align = "left"   class="selTitle">　Y品番:　
					<input type="text"  class="item" name="itemNo" id="itemNo" style="width: 120px; height:25px; font-size:15px; color:blue; "  value="<%=formBean.getItemNo()%>" maxlength="11" onblur="itemBlur();">
					<input type="button" onclick="nextPageJump('spa3000');" class="itemSearch" value="予備品選択">

					</td>
				</tr>

				<tr>
					<td id="" align = "left"  valign="top"  class="selTitle" colspan="3">　品名:　　
						<textarea class="ReadStyle" name="itemNm" id="itemNm" cols="40" rows="2" style="width:  500px; font-size:15px; color:blue;" readonly><%=formBean.getItemNm()%></textarea>
					</td>
				</tr>
                <tr>
					<td id="" align = "left"  valign="top"  class="selTitle" colspan="3">　型式:　　
						<textarea class="ReadStyle" name="model" id="model" cols="40" rows="2" style="width:  500px; font-size:15px; color:blue;" readonly><%=formBean.getModel()%></textarea>
					</td>
				</tr>
				<tr>
					<td id="" align = "left"   class="selTitle">　棚番:　　
					<input type="text" class="ReadStyle" name="rackNo" id="rackNo" style="width: 100px; height:25px; font-size:15px; color:blue;"  value="<%=formBean.getRackNo()%>" readonly></td>
				</tr>

				<tr>
					<td id="" align = "left"   class="selTitle">　出庫区分:
						<select name="delvDiv"  id="delvDiv"  style="width:150px; height:33px; font-size:15px; color:blue;" onChange="delvDivChange();">
								<%
								Ren2000Bean.PullData[] inputDelvDivList = formBean.getInputDelvDivList();
								for (int i = 0; inputDelvDivList != null && i < inputDelvDivList.length; i++) {
									Ren2000Bean.PullData data = inputDelvDivList[i];
									if(data.key.equals(formBean.getDelvDiv())){
										data.selected = "selected";
									}
								%>
								<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select>
						　出庫日:
						<input type="date"  class="" name="delvDt" id="delvDt" style="width: 100px; height:33px; font-size:15px; color:blue;"  value="<%=formBean.getDelvDt() %>">
					</td>
				</tr>



				<tr>
					<td id="" align = "left"   class="selTitle" colspan="2">　出庫新品数量:
						<input type="text"  class="" name="delvNewNum" id="delvNewNum" style="width: 100px; height:25px; font-size:15px; color:blue;text-align:right;" onclick='clsNKB.setNumKeyBoard(this, 5, 0, true, 200);' onChange='afterInputData(this);' value="<%=formBean.getDelvNewNum()%>" readonly>
						　出庫中古数量:
						<input type="text"  class="" name="delvUsedNum" id="delvUsedNum" style="width: 70px; height:25px; font-size:15px; color:blue;text-align:right;"  onclick='clsNKB.setNumKeyBoard(this, 5, 0, true, 200);' onChange='afterInputData(this);' value="<%=formBean.getDelvUsedNum()%>" readonly>
					</td>

				</tr>


				<tr>
					<td id="" align = "left"   class="selTitle">　出庫先:　
						<select name="delvSite"  id="delvSite"  style="width:230px; height:30px; font-size:15px; color:blue;" onChange="">
								<option value=''selected></option>
								<%
								Ren2000Bean.PullData[] inputDelvSiteList = null;
								if("0".equals(formBean.getDelvDiv())){
									inputDelvSiteList = formBean.getInputDelvSiteList_s();
								}else{
									inputDelvSiteList = formBean.getInputDelvSiteList_k();
								}
								for (int i = 0; inputDelvSiteList != null && i < inputDelvSiteList.length; i++) {
									Ren2000Bean.PullData data = inputDelvSiteList[i];
									if(data.key.equals(formBean.getDelvSite())){
										data.selected = "selected";
									}
								%>
								<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select>
						　出庫先担当者:
						<input type="text" name="delvSiteUsr"  id="delvSiteUsr"  style="width:230px; height:30px; font-size:15px; color:blue;" value="<%=formBean.getDelvSiteUsr()%>">
						<select name="delvSiteUsrSelect"  id="delvSiteUsrSelect"  style="width:22px; height:35px; font-size:15px; color:blue;" onChange="setDelvSiteUsr();">
								<option value=''selected></option>
								<%
								Ren2000Bean.PullData[] inputDelvSiteUsrList = null;
								if("0".equals(formBean.getDelvDiv())){
									inputDelvSiteUsrList = formBean.getInputDelvSiteUsrList_s();
								}else{
									inputDelvSiteUsrList = formBean.getInputDelvSiteUsrList_k();
								}
								for (int i = 0; inputDelvSiteUsrList != null && i < inputDelvSiteUsrList.length; i++) {
									Ren2000Bean.PullData data = inputDelvSiteUsrList[i];
									if(data.key.equals(formBean.getDelvSiteUsr())){
										data.selected = "selected";
									}
								%>
								<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select></td>
				</tr>


				<tr>
					<td id="" align = "left"   class="selTitle" colspan="2">　理由:　　
						<input type="text"  class="" name="delvReasonTxt" id="delvReasonTxt" style="width: 500px; height:25px; font-size:15px; color:blue;"  value="<%=formBean.getDelvReasonTxt()%>">
						<select name="delvReason"  id="delvReason"  style="width:22px; height:35px; font-size:15px; color:blue;" onChange="setDelvReason();">
								<option value=''selected></option>
								<%
								Ren2000Bean.PullData[] inputDelvReasonList = null;
								if("0".equals(formBean.getDelvDiv())){
									inputDelvReasonList = formBean.getInputDelvReasonList_s();
								}else{
									inputDelvReasonList = formBean.getInputDelvReasonList_k();
								}
								for (int i = 0; inputDelvReasonList != null && i < inputDelvReasonList.length; i++) {
									Ren2000Bean.PullData data = inputDelvReasonList[i];
								%>
								<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select>
					</td>
				</tr>

				<!--線を引く -->
				<tr><td  colspan="4"><hr></td></tr>

				<tr>
					<td id="" align = "left"   class="selTitle" colspan="2">　修理/貸出担当者:
						<select name="delvUsr"  id="delvUsr"  style="width:150px; height:30px; font-size:15px; color:blue;" onChange="odrUsrSideDell(this);">
								<option value=''selected></option>
								<%
								Ren2000Bean.PullData[] inputEmpPullList = formBean.getInputEmpPullList();
								for (int i = 0; inputEmpPullList != null && i < inputEmpPullList.length; i++) {
									Ren2000Bean.PullData data = inputEmpPullList[i];
									if(data.key.equals(formBean.getClassDelvUsr())){
										data.selected = "selected";
									}
								%>
								<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select>
						<select name="delvUsrList"  id="delvUsrList"  style="width:100px; height:30px; font-size:15px; color:blue;" onChange="odrUsrSideDell2(this);">
								<option value=''selected></option>
								<%
								Ren2000Bean.PullData[] inputEmpPullList2 = formBean.getInputEmpPullList2();
								for (int i = 0; inputEmpPullList2 != null && i < inputEmpPullList2.length; i++) {
									Ren2000Bean.PullData data = inputEmpPullList2[i];
									if(data.key2.equals(formBean.getDelvUsr())){
										data.selected = "selected";
									}
								%>
								<option value='<%=data.key + "*" + data.key2%>' <%=data.selected%> ><%=data.value%></option>
								<%}%>
						</select>
					</td>

				</tr>
				<tr>
					<td></td>
					<td align="right" >
						<input type="button" onclick="orderBtn('act2000');" class="confirmBtn2" value="出庫登録">　　
					</td>
					<td align="right" >
						<input type="button" onclick="backBtn('top1000');" class="confirmBtn" value="戻る">　
					</td>
				</tr>
			</table>


			<!--ログインMAIN画面　END  -->

		</td>
	</tr>
</table>
	<div class='footer' align='right' style="font-size:35px; background-image: url(../../common/img/toyotaB.png); background-repeat: no-repeat; align:top;" ></div>
    <div class='ImageZone' align='right' style="font-size:20px; align:top"><img id="picfileNm"  class="image" src='<%=appMng.getAppConfig("userconfig.imagepath")%><%=formBean.getPicfileNm()%>' height='170px' width='330px'></div>

	<input type="hidden" id="nextPage" name="nextPage" value="">
	<input type="hidden" id="orderExe" name="orderExe" value="">
	
	<input type="hidden" id="delvUsrListKey" name="delvUsrListKey" value="">
	
	<input type="hidden" id="updateDt_hid" name="updateDt_hid" value="<%=formBean.getUpdateDt_hid() %>">
	<input type="hidden" id="updateDt_stock" name="updateDt_stock" value="<%=formBean.getUpdateDt_stock() %>">
	
	<!--警告 ポップアップ---------------------------------------------------------------------------- -->
	<div id="allbackgr" class="allbackgr" style="display:none;"></div>
	<div class="opAlertBtn" id = "opAlertBtn" style="display:none;" ></div>
	<div class="opAlertButton" id = "opAlertButton" style="display:none;" ></div>
	<div class="opAlertTop" id = "opAlertTop" style="display:none; font-size:22px;">　予備品管理システム　</div>
	<div class="opAlert" id = "opAlert" style="display:none;"></div>
	<!-- -------------------------------------------------------------------------------------------- -->

<!-- ITEM-DROPDOWN START -->
<div class="dropdown-panel" id="dropdown-panel">
	<div class="dropdown-panel-in">
		<div class="header">
			<div style="float:left;width:110px;height:20px;">
				<table border=0>
					<tr>
						<td style="width:110px;height:20px;">品番</td>
					</tr>
				</table>
			</div>
			<div style="float:right;width:40px;text-align:right;">
				<button class="closebtn" type="button" onClick="closeBtn();" style="width:18px;height:17px; padding:0px;">
					<img src="../../common/js/dropdown/close.gif" alt="閉じる">
				</button>
			</div>
		</div>
		<div class="drop-contents" id="drop-contents">
		</div>
		<div class="footer"></div>
	</div>
</div>
<!-- ITEM-DROPDOWN END -->
</form>
</body>
</html>
